{include file='public:header-css'/}
<body>
<div class="lyear-layout-web">
  <div class="lyear-layout-container">
    <!--左侧导航-->
    {include file='public:left-menu'/}
    <!--End 左侧导航-->
    <!--头部信息-->
    {include file='public:nav-header' title="交易管理" subTitle="会员某票列表"/}
    <!--End 头部信息-->

    <!--页面主要内容-->
    <main class="lyear-layout-content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-toolbar">
                  <div class="toolbar-btn-action">
                      <a class="btn btn-label btn-theme" href="{:url('Deal/add_user_wallet')}"><label><i class="mdi mdi-plus-box"></i></label> 添加某票</a>
                  </div>
                <div class="card-toolbar-center">
                  <a href="" class="table-btn btn-dark"><i class="mdi mdi-replay"></i></a>
                  <button class="table-btn btn-theme">共{$list->total()}条记录 当前第{$list->currentPage()}页</button>
                </div>
                <form class="table-form" method="post" action="">
                  <div class="table-form-group">
                      <select name="wid" class="input-group-select">
                          <option value="">钱包名称</option>
                        {volist name="$wallet_list" id="wallet"}
                        <option value="{$wallet.id}" {if $Request.param.wid==$wallet.id}selected{/if}>{$wallet.name}</option>
                        {/volist}
                      </select>
                    {assign name="search_type" value="$Request.param.search_type|default='mobile'" /}
                    <select name="search_type" class="input-group-select">
                      <option value="mobile" {if $search_type=='mobile'}selected{/if}>手机号码</option>
                      <option value="realname" {if $search_type=='realname'}selected{/if}>真实姓名</option>
                    </select>
                    <input type="text" value="{$Request.param.search_key}" name="search_key"
                           placeholder="查询">
                    <button class="btn btn-default" onclick="submit1(1)" type="button">搜索</button>
                  </div>
                </form>
              </div>
              <div class="card-body">
                <div class="table-responsive">
                  <table class="table table-bordered table-striped table-hover">
                    <thead>
                    <tr>
                      <th style="width: 140px">操作</th>
                      <th>编号</th>
                      <th>手机号码</th>
                      <th>真实姓名</th>
                      <th>钱包名称</th>
                      <th>余额</th>
                      <th>创建时间</th>
                    </tr>
                    </thead>
                    <tbody>
                    {if $list->isEmpty()}
                    <tr>
                      <td class="no-data" colspan="50">
                        <i class="mdi mdi-alert-decagram"></i>没有符合条件的记录
                      </td>
                    </tr>
                    {else/}
                    {volist name="$list" id="vo"}
                    <tr>
                        <td>
                            <a class="table-btn btn-theme" href="{:url('Deal/add_user_wallet',['id'=>$vo[$vo.pk]])}"><i class="mdi mdi-pencil"></i>调节</a>
                            <a class="table-btn btn-theme" href="{:url('Deal/user_wallet_log',['id'=>$vo[$vo.pk]])}"><i class="mdi mdi-eye"></i>明细</a>
                        </td>
                      <td>{$vo[$vo.pk]}</td>
                      <td><a href="{:url('User/detail',['user_id'=>$vo.user_id])}">{$vo.user.mobile}</a></td>
                      <td>{$vo.user.realname|default='无'}</td>
                      <td>{$vo.qianbao.name}</td>
                      <td>{$vo.money}</td>
                      <td>{$vo.add_time}</td>
                    </tr>
                    {/volist}
                    {/if}
                    </tbody>
                  </table>
                </div>
                <!--分页-->
                <div class="page">
                  {$page|raw}
                </div>
              </div>
            </div>
          </div>

        </div>

      </div>

    </main>
    <!--End 页面主要内容-->
  </div>
</div>
<!--日期选择插件-->
<script type="text/javascript">
  $(function(){
  });
  //回车提交
  $(document).keyup(function(event){
    if(event.keyCode ==13){
      submit1(1);
    }
  });
  function submit1(type) {
    var url="{:url('Deal/user_wallet_list')}";
    $('.table-form').attr('action',url).submit();
  }
</script>
</body>
</html>
